public class Main {
    public static void main(String[] args) {
        ListNode list1 = new ListNode(1);
        ListNode list11 = new ListNode(2);
        ListNode list111 = new ListNode(4);
        list1.next = list11;
        list11.next = list111;
        ListNode list2 = new ListNode(1);
        ListNode list22 = new ListNode(3);
        ListNode list222 = new ListNode(4);
        list2.next = list22;
        list22.next = list222;
        Solution solution = new Solution();
        ListNode listNode = solution.mergeTwoLists(list1,list2);
        ListNode cur = listNode;
        while (cur != null) {
            System.out.print(cur.val + " ");
            cur = cur.next;
        }
    }
}
